package com.zbcbms.entity.tableData;

import javafx.beans.property.SimpleStringProperty;

import java.util.Date;

/**
 * @author fengq
 */
public class BookBorrowTableData {
    private SimpleStringProperty id;
    private SimpleStringProperty bookNumber;
    private SimpleStringProperty bookName ;
    private SimpleStringProperty borrowDate;
    private SimpleStringProperty returnDate;
    private SimpleStringProperty deadline;
    private SimpleStringProperty status;
    private SimpleStringProperty operatorName;
    private SimpleStringProperty userNumber;
    private SimpleStringProperty userName;

    public SimpleStringProperty getId() {
        return id;
    }

    public void setId(String id) {
        this.id.set(id);
    }

    public SimpleStringProperty getBookNumber() {
        return bookNumber;
    }

    public void setBookNumber(String bookNumber) {
        this.bookNumber.set(bookNumber);
    }

    public SimpleStringProperty getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName.set(bookName);
    }

    public SimpleStringProperty getBorrowDate() {
        return borrowDate;
    }

    public void setBorrowDate(Date borrowDate) {
        this.borrowDate.set(borrowDate.toString());
    }

    public SimpleStringProperty getReturnDate() {
        return returnDate;
    }

    public void setReturnDate(Date returnDate) {
        this.returnDate.set(returnDate.toString());
    }

    public SimpleStringProperty getDeadline() {
        return deadline;
    }

    public void setDeadline(Date deadline) {
        this.deadline.set(deadline.toString());
    }

    public SimpleStringProperty getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status.set(status);
    }

    public SimpleStringProperty getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName.set(operatorName);
    }

    public SimpleStringProperty getUserNumber() {
        return userNumber;
    }

    public void setUserNumber(String userNumber) {
        this.userNumber.set(userNumber);
    }

    public SimpleStringProperty getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName.set(userName);
    }

    public BookBorrowTableData() {
    }

    public BookBorrowTableData(String id, String bookNumber, String bookName, Date borrowDate, Date returnDate, Date deadline,
                               String status, String operatorName, String userNumber, String userName) {
        this.id=new SimpleStringProperty(id);
        this.bookNumber=new SimpleStringProperty(bookNumber);
        this.bookName=new SimpleStringProperty(bookName);
        this.borrowDate=new SimpleStringProperty(borrowDate.toString());
        if (returnDate==null){
            this.returnDate=new SimpleStringProperty("  ");
        }else {
            this.returnDate=new SimpleStringProperty(returnDate.toString());
        }
        this.deadline=new SimpleStringProperty(deadline.toString());
        this.status=new SimpleStringProperty(status);
        this.operatorName=new SimpleStringProperty(operatorName);
        this.userNumber=new SimpleStringProperty(userNumber);
        this.userName=new SimpleStringProperty(userName);
    }
}
